package kr.saeildamil.androidstudy.ch13;

import kr.saeildamil.androiddforstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;

public class ProgressTitleTest2 extends Activity {
	int progress;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_PROGRESS);
		setContentView(R.layout.ch13_progresstitletest2);
		
		progress = 5000;
		setProgress(progress);
		setProgressBarVisibility(true);
	}
	
	public void mOnClick(View v){
		switch (v.getId()) {
		case R.id.ch13_progresstitle2_decfirst:
			if(progress>=200) progress -= 200;
			setProgress(progress);
			break;
		case R.id.ch13_progresstitle2_incfirst:
			if(progress<=9800) progress += 200;
			setProgress(progress);
			break;
		}
	}
}
